<?php require_once('../src/session_start.inc.php'); ?>
<?php
require_once('../src/define.inc.php');
require_once('../src/functions.php');

require_once('../src/photo.class.php');
require_once('../src/annonce.class.php');
$ann = new annonce();
$ann_ids = $ann->getHighlight();
?>
<?php $page='accueil'; require_once('../layout/header.php'); ?>

<div id="leftColumn">
	<h2>Bienvenue sur le site<span>de l'immobilier nouveau</span></h2>
	<p class="justify">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec congue nunc <a href="#">vitae lectus</a>. Donec ipsum felis, dapibus et, mollis eget, egestas at, nulla. Cras suscipit iaculis nisl. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.<br/>Nunc at leo. Quisque pretium, libero eget varius feugiat, ipsum lorem dignissim justo, ut accumsan justo turpis scelerisque odio. Mauris tristique. Nam lacinia venenatis nunc. Vestibulum convallis ultrices justo. Proin sed ipsum.</p>
	<h3>Nos services et notre qualité</h3>
	<ul>
		<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
		<li>Donec congue nunc <a href="#">vitae lectus</a>.</li>
		<li>Donec ipsum felis, dapibus et, mollis eget, egestas at, nulla.</li>
	</ul>
</div>
<div id="rightColumn">
	<h3>Nos meilleures offres</h3>
<?php
if(empty($ann_ids)) {
	echo 'Aucune annonce coup de coeur';
} else {
	foreach($ann_ids as $id) {
		$annonce = new annonce($id);
?>
	<a class="annonce_mini" href="<?php echo URL . 'annonce/annonce.php?ref=' . rawurlencode($annonce->reference) ?>">
		<img src="<?php echo THUMB_HTTP_DIR . photo::getRandom($annonce->photos) ?>" alt="" />
		<?php echo displayPiece($annonce->piece) ?>
		<br/>
		<?php echo displaySurface($annonce->surface) ?>
		<br/>
		<?php echo displayPrice($annonce->prix) ?>
	</a>
<?php
	}
}
?>
</div>

<?php require_once('../layout/footer.php'); ?>